home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
btnclock
/
frmclock.frm
< prev
next >
Wrap
Text File
|
1995-09-06
|
2KB
|
65 lines
VERSION 2.00
Begin Form frmClock
BorderStyle = 0 'None
Caption = "Form1"
ClientHeight = 660
ClientLeft = 1515
ClientTop = 1500
ClientWidth = 4335
Height = 1065
Left = 1455
LinkTopic = "Form1"
ScaleHeight = 660
ScaleWidth = 4335
Top = 1155
Width = 4455
Begin CommandButton btnClock
Caption = "time / date go here"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 432
Left = 0
TabIndex = 0
Top = 0
Width = 2292
End
Begin Timer Timer1
Interval = 3000
Left = 3240
Top = 60
End
End
Option Explicit
Sub btnClock_Click ()
frmStopClock.Show
End Sub
Sub Form_Load ()
Rem Make the form frmClock the same size as
Rem the button btnClock so that we only see
Rem btnClock. Borderstyle of frmClock must be 0
frmClock.Height = btnClock.Height
frmClock.Width = btnClock.Width
Rem Now set the Top and Left poperties of
Rem btmForm to put it on the lower rigth
Rem corner of the display screen
frmClock.Top = Screen.Height - frmClock.Height
frmClock.Left = Screen.Width - frmClock.Width
ShowTheTime ' initial time display
End Sub
Sub ShowTheTime ()
btnClock.Caption = Format$(Now, "hh:mm AMPM dd mmm")
Rem Make the display format what you want
End Sub
Sub Timer1_Timer ()
ShowTheTime ' update the display
End Sub